Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fix impersonated cred for gcloud #516

Merged
merged 2 commits into from
May 28, 2020
Merged

fix: fix impersonated cred for gcloud #516

merged 2 commits into from
May 28, 2020

Conversation

arithmetic1728
Copy link
Contributor

@arithmetic1728 arithmetic1728 commented May 28, 2020

(1) For IDTokenCredentials.refresh(self.request), use the provided
request instead of creating a new one
(2) For impersonated_credentials.Credentials, only refresh the source credentials if it is not
valid (in other words, expires within _helpers.CLOCK_SKEW=5 minutes). Also we need to remove the expired function (because it doesn't support clock skew), so it can fall back to the expired function defined in google.auth.credentials.Credentials interface which respect the clock skew.

(1) For IDTokenCredentials.refresh(self.request), use the provided 
request instead of creating a new one
(2) For Credentials, only refresh the source credentials if it is not 
valid
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label May 28, 2020
@arithmetic1728 arithmetic1728 merged commit eb7be3f into master May 28, 2020
@arithmetic1728 arithmetic1728 deleted the sijun/gcloud branch May 28, 2020 18:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants